<?php

class UrlJson extends Module
{
    function __construct()
    {
    }
    
    function convert()
    {
        $ret = array('ret'=>true, 'info'=>'成功.');
        $url = isset( $_POST['url'] ) ? trim( $_POST['url'] ) : '';
        $ret['data'] = print_r( json_decode( file_get_contents($url), true ), true );
        echo json_encode( $ret );
    }
    
    function display()
    {
        parent::smartyOut('urljson');
    }
}
